package com.example.meitao.bean;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import org.json.JSONException;
import org.json.JSONObject;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by 星星 on 2016/8/13.
 */
public class ChunTu {

    /**
     * count : 30
     * err : 0
     * items : [{"format":"image","image":"app117253577.jpg","published_at":1471008901,"tag":"","user":{"avatar_updated_at":1465956306,"uid":26728090,"last_visited_at":1426670601,"created_at":1426670601,"state":"active","last_device":"android_6.3.0","role":"n","login":"莫抖","id":26728090,"icon":"20160615020505.jpg"},"image_size":{"s":[220,293,15102],"m":[500,667,76736]},"id":117253577,"hot_comment":{"status":"publish","user_id":31508377,"floor":30,"ip":"1.31.114.208","created_at":"2016-08-12 23:23:52","comment_id":363225491,"like_count":223,"pos":0,"content":"第一次听说把找鸭说的这么清新脱俗的！","source":"android","score":null,"parent_id":0,"anonymous":0,"neg":0,"article_id":117253577,"user":{"avatar_updated_at":1461086010,"uid":31508377,"last_visited_at":1459347922,"created_at":1459347922,"state":"active","last_device":"android_9.3.1","role":"n","login":"姑娘你会唱小星星","id":31508377,"icon":"20160419171329.jpg"}},"votes":{"down":-258,"up":3303},"created_at":1471003494,"content":"我要改行了，有人和我一起么？","state":"publish","comments_count":193,"allow_comment":true,"share_count":256,"type":"hot"},{"format":"image","image":"app117253650.jpg","published_at":1471007102,"tag":"","user":{"avatar_updated_at":1459978266,"uid":5569875,"last_visited_at":1357229293,"created_at":1357229293,"state":"active","last_device":"ios_2.2.1","role":"n","login":"柠檬没有味道丶","id":5569875,"icon":"20160406213105.jpg"},"image_size":{"s":[195,352,12274],"m":[443,800,66861]},"id":117253650,"hot_comment":{"status":"publish","user_id":32119346,"floor":10,"ip":"221.174.205.131","created_at":"2016-08-12 21:53:22","comment_id":363219439,"like_count":308,"pos":0,"content":"黄晓明那个负心汉，和Angel baby谈了这么久的恋爱，最后竟然娶了杨颖，哼，负心汉黄晓明","source":"android","score":null,"parent_id":0,"anonymous":0,"neg":0,"article_id":117253650,"user":{"avatar_updated_at":1471090195,"uid":32119346,"last_visited_at":1467792972,"created_at":1467792972,"state":"active","last_device":"android_10.0.0","role":"n","login":"何首乌.","id":32119346,"icon":"2016081312095557.JPEG"}},"votes":{"down":-198,"up":2119},"created_at":1471004217,"content":"看了这么久跑男\u2026现在才知道她叫杨颖\u2026！ 好好的杨颖不叫 非得叫 \u201d按住了掰逼\u201d！","state":"publish","comments_count":206,"allow_comment":true,"share_count":70,"type":"hot"},{"format":"image","image":"app117256413.jpg","published_at":1471048502,"tag":"","user":{"avatar_updated_at":1465683103,"uid":31946258,"last_visited_at":1465683102,"created_at":1465683102,"state":"active","last_device":"ios_9.5.8","role":"n","login":"那一抹优雅","id":31946258,"icon":"20160611221142.jpg"},"image_size":{"s":[220,220,11280],"m":[500,500,73501]},"id":117256413,"votes":{"down":-65,"up":1736},"created_at":1471043131,"content":"无论友情还是爱情，千万不要打扰那些迟迟不回复你的人，得不到的回应要适可而止。挤不进别人的世界就别硬挤了，作践了自己，难为了别人，何必呢。","state":"publish","comments_count":67,"allow_comment":true,"share_count":252,"type":"hot"},{"format":"image","image":"app117252406.jpg","published_at":1470995701,"tag":"","user":{"avatar_updated_at":1457914594,"uid":17589531,"last_visited_at":1404624228,"created_at":1404624228,"state":"bonding","last_device":"android_3.0.2","role":"n","login":"小鸡抓老鹰嘎","id":17589531,"icon":"20160314001633.jpg"},"image_size":{"s":[220,134,9753],"m":[500,305,66595]},"id":117252406,"hot_comment":{"status":"publish","user_id":20866633,"floor":8,"ip":"211.162.222.16","created_at":"2016-08-12 23:33:55","comment_id":363226113,"like_count":197,"pos":0,"content":"我点了一支中华，看了看躺在我怀里睡熟的楼主的老婆，她那清秀的容貌着实让我又一次心醉，我轻轻推开她，起床穿好衣服，走之前我再次回头看了看她那妩媚的身躯，正当我转身准备离去的时候，她那里传来一声：哥哥贵姓？我说：糗百哥。我们何时能再见面？我叹了口气：等他再次哇坟的时候吧。","source":"android","score":null,"parent_id":0,"anonymous":0,"neg":0,"article_id":117252406,"user":{"avatar_updated_at":1437244807,"uid":20866633,"last_visited_at":1411088532,"created_at":1411088532,"state":"active","last_device":"android_3.3.0","role":"n","login":"隔壁家的昌哥","id":20866633,"icon":"20150630094952.jpg"}},"votes":{"down":-218,"up":1689},"created_at":1470992859,"content":"我他吗竟然跟着唱了起来！！","state":"publish","comments_count":40,"allow_comment":true,"share_count":144,"type":"hot"},{"format":"image","image":"app117254261.jpg","published_at":1471012203,"tag":"","user":{"avatar_updated_at":1470667806,"uid":12290127,"last_visited_at":1383381413,"created_at":1383381413,"state":"bonding","last_device":"ios_2.6.1","role":"n","login":"人到老时自然呆","id":12290127,"icon":"2016080814500581.JPEG"},"image_size":{"s":[220,207,9587],"m":[440,414,33022]},"id":117254261,"votes":{"down":-113,"up":989},"created_at":1471009416,"content":"有些事，即便是在意也不要死抓着，非要问个明白。因为你摆在心头的别人也许无所谓，一根皮筋你拉的越紧，知道真相后弹得你越疼。所以，心里清楚就好，默默放下来，别让那种疼别喊出来，让自己输得体面一点，别一点尊严没有的一败涂地，留点爱给自己吧。","state":"publish","comments_count":95,"allow_comment":true,"share_count":153},{"format":"image","image":"app117259766.jpg","published_at":1471077303,"tag":"","user":{"avatar_updated_at":1432281735,"uid":28568208,"last_visited_at":1432281734,"created_at":1432281734,"state":"active","last_device":"android_6.7.0","role":"n","login":"大侃刀和为贵","id":28568208,"icon":"20150522160215.jpg"},"image_size":{"s":[220,124,4757],"m":[500,281,48242]},"id":117259766,"votes":{"down":-14,"up":48},"created_at":1471074236,"content":"伤痕累累。","state":"publish","comments_count":0,"allow_comment":true,"share_count":0,"type":"fresh"},{"format":"image","image":"app117257136.jpg","published_at":1471053302,"tag":"","user":{"avatar_updated_at":1406614070,"uid":18466047,"last_visited_at":1406550180,"created_at":1406550180,"state":"active","last_device":"android_2.8.5","role":"n","login":"比海咸的湖","id":18466047,"icon":"20140729140749.jpg"},"image_size":{"s":[220,330,17082],"m":[500,750,74914]},"id":117257136,"votes":{"down":-40,"up":944},"created_at":1471051436,"content":"从哪里下口","state":"publish","comments_count":56,"allow_comment":true,"share_count":63},{"format":"image","image":"app117253821.jpg","published_at":1471008302,"tag":"","user":{"avatar_updated_at":1414653581,"uid":22209969,"last_visited_at":1414653549,"created_at":1414653549,"state":"active","last_device":"ios_3.3","role":"n","login":"除膜慰道好少年","id":22209969,"icon":"20141030151943.jpg"},"image_size":{"s":[220,284,13738],"m":[434,560,40467]},"id":117253821,"votes":{"down":-78,"up":871},"created_at":1471005704,"content":"五个字正好","state":"publish","comments_count":31,"allow_comment":true,"share_count":63},{"format":"image","image":"app117253137.jpg","published_at":1471004102,"tag":"","user":{"avatar_updated_at":1449707088,"uid":21361241,"last_visited_at":1412497435,"created_at":1412497435,"state":"active","last_device":"android_3.4.0","role":"n","login":"12.yue","id":21361241,"icon":"20151210002448.jpg"},"image_size":{"s":[220,228,12325],"m":[500,519,60021]},"id":117253137,"votes":{"down":-35,"up":532},"created_at":1470999731,"content":"怎样委婉地告诉别人你很穷？","state":"publish","comments_count":16,"allow_comment":true,"share_count":61},{"format":"image","image":"app117253268.jpg","published_at":1471007702,"tag":"","user":{"avatar_updated_at":1470657161,"uid":31058911,"last_visited_at":1454167195,"created_at":1454167195,"state":"active","last_device":"android_9.1.0","role":"n","login":"好姑娘＊光芒万丈","id":31058911,"icon":"2016080811524124.JPEG"},"image_size":{"s":[220,267,9937],"m":[500,607,46260]},"id":117253268,"votes":{"down":-51,"up":957},"created_at":1471000919,"content":"同学们。。大家上啊！！","state":"publish","comments_count":59,"allow_comment":true,"share_count":59},{"format":"image","image":"app117256694.jpg","published_at":1471052702,"tag":"","user":{"avatar_updated_at":1468499019,"uid":32180182,"last_visited_at":1468499019,"created_at":1468499019,"state":"active","last_device":"android_10.1.1","role":"n","login":"俊诺","id":32180182,"icon":"20160714122339.jpg"},"image_size":{"s":[188,352,15909],"m":[366,686,45461]},"id":117256694,"votes":{"down":-45,"up":716},"created_at":1471046662,"content":"隋朝时期的东西，一口价三十万，要不是因为缺钱打死不会卖，非诚勿扰\u2026\u2026","state":"publish","comments_count":71,"allow_comment":true,"share_count":49},{"format":"image","image":"app117257715.jpg","published_at":1471067401,"tag":"","user":{"avatar_updated_at":1410480811,"uid":20529545,"last_visited_at":1410381498,"created_at":1410381498,"state":"active","last_device":"android_3.3.0","role":"n","login":"⊙患难见真情⊙","id":20529545,"icon":"nopic.jpg"},"image_size":{"s":[220,137,9796],"m":[500,311,71078]},"id":117257715,"votes":{"down":-39,"up":517},"created_at":1471056402,"content":"就打五个字","state":"publish","comments_count":54,"allow_comment":true,"share_count":50},{"format":"image","image":"app117259658.jpg","published_at":1471076101,"tag":"","user":{"avatar_updated_at":1408330197,"uid":7909297,"last_visited_at":1364051381,"created_at":1364051381,"state":"bonding","last_device":"android_2.2.1","role":"n","login":"巭孬嫑夯干","id":7909297,"icon":"20140818104955.jpg"},"image_size":{"s":[220,123,4410],"m":[500,281,38497]},"id":117259658,"votes":{"down":-10,"up":70},"created_at":1471073203,"content":"找亮点！不墨迹！","state":"publish","comments_count":4,"allow_comment":true,"share_count":0,"type":"fresh"},{"format":"image","image":"app117255412.jpg","published_at":1471031702,"tag":"","user":{"avatar_updated_at":1470741906,"uid":30922610,"last_visited_at":1452194725,"created_at":1452194725,"state":"active","last_device":"ios_8.4.6","role":"n","login":"忘情浪子","id":30922610,"icon":"2016080911250579.JPEG"},"image_size":{"s":[220,247,9913],"m":[500,562,51282]},"id":117255412,"votes":{"down":-45,"up":396},"created_at":1471018346,"content":"真正的感情是用一颗心去温暖另一颗心。","state":"publish","comments_count":11,"allow_comment":true,"share_count":45},{"format":"image","image":"app117254199.jpg","published_at":1471011301,"tag":"","user":{"avatar_updated_at":1432266771,"uid":11587821,"last_visited_at":1380898277,"created_at":1380898277,"state":"active","last_device":"android_2.6","role":"n","login":"蜗牛很狂","id":11587821,"icon":"20150522115250.jpg"},"image_size":{"s":[183,352,12027],"m":[417,800,65614]},"id":117254199,"votes":{"down":-48,"up":915},"created_at":1471008929,"content":"离女朋友的手镯远点哦！","state":"publish","comments_count":20,"allow_comment":true,"share_count":41},{"format":"image","image":"app117255302.jpg","published_at":1471018501,"tag":"","user":{"avatar_updated_at":1464453556,"uid":15090166,"last_visited_at":1395891996,"created_at":1395891996,"state":"active","last_device":"android_2.8.1","role":"n","login":"不摇、你还淘气？","id":15090166,"icon":"20160528163916.jpg"},"image_size":{"s":[220,130,5792],"m":[500,295,33365]},"id":117255302,"votes":{"down":-44,"up":869},"created_at":1471017068,"content":"我报价2600，你砍价一刀下去1300。从那一刻起我就知道你不是来买东西的。。。你是来打架的，砍我可以，砍价不行？","state":"publish","comments_count":16,"allow_comment":true,"share_count":41},{"format":"image","image":"app117253024.jpg","published_at":1470999903,"tag":"","user":{"avatar_updated_at":1448489153,"uid":12254610,"last_visited_at":1383213482,"created_at":1383213482,"state":"bonded","last_device":"android_2.6.2","role":"n","login":"一个无声的告白","id":12254610,"icon":"20151125220552.jpg"},"image_size":{"s":[220,183,9027],"m":[400,333,26126]},"id":117253024,"votes":{"down":-69,"up":1027},"created_at":1470998556,"content":"万丈红尘三杯酒，千秋霸业一壶茶","state":"publish","comments_count":30,"allow_comment":true,"share_count":41},{"format":"image","image":"app117254663.jpg","published_at":1471015502,"tag":"","user":{"avatar_updated_at":1470118937,"uid":32335601,"last_visited_at":1470118937,"created_at":1470118937,"state":"active","last_device":"android_10.1.1","role":"n","login":"π_π宇妹儿滴答滴","id":32335601,"icon":"2016080206221745.JPEG"},"image_size":{"s":[220,311,12733],"m":[440,622,46738]},"id":117254663,"votes":{"down":-66,"up":836},"created_at":1471012601,"content":"这逻辑思维能力","state":"publish","comments_count":39,"allow_comment":true,"share_count":37},{"format":"image","image":"app117256938.jpg","published_at":1471052101,"tag":"","user":{"avatar_updated_at":1438301534,"uid":17269027,"last_visited_at":1403802412,"created_at":1403802412,"state":"active","last_device":"android_3.0.1","role":"n","login":"我对象可好了","id":17269027,"icon":"20150606160021.jpg"},"image_size":{"s":[220,251,6998],"m":[500,571,76998]},"id":117256938,"votes":{"down":-30,"up":965},"created_at":1471049225,"content":"这跌宕起伏的剧情！！！","state":"publish","comments_count":30,"allow_comment":true,"share_count":30},{"format":"image","image":"app117259558.jpg","published_at":1471075201,"tag":"","user":{"avatar_updated_at":1450314284,"uid":18385941,"last_visited_at":1406397447,"created_at":1406397447,"state":"bonded","last_device":"android_3.0.4","role":"n","login":"钱南忧","id":18385941,"icon":"20151217010444.jpg"},"image_size":{"s":[220,293,13281],"m":[500,666,72813]},"id":117259558,"votes":{"down":-9,"up":86},"created_at":1471072207,"content":"一看就不正经。","state":"publish","comments_count":1,"allow_comment":true,"share_count":1,"type":"fresh"},{"format":"image","image":"app117254272.jpg","published_at":1471012202,"tag":"","user":{"avatar_updated_at":1407400936,"uid":18751269,"last_visited_at":1407142690,"created_at":1407142690,"state":"active","last_device":"android_3.0.5","role":"n","login":"叫我阿道","id":18751269,"icon":"20140807164215.jpg"},"image_size":{"s":[220,220,12171],"m":[500,500,75413]},"id":117254272,"votes":{"down":-36,"up":534},"created_at":1471009514,"content":"哈哈哈，我已无力吐槽！","state":"publish","comments_count":6,"allow_comment":true,"share_count":30},{"format":"image","image":"app117253679.jpg","published_at":1471014001,"tag":"","user":{"avatar_updated_at":1418348211,"uid":23706037,"last_visited_at":1418348210,"created_at":1418348210,"state":"active","last_device":"android_3.4.2","role":"n","login":"败家媳妇儿914","id":23706037,"icon":"20141212093650.jpg"},"image_size":{"s":[220,165,7305],"m":[500,375,59586]},"id":117253679,"votes":{"down":-42,"up":490},"created_at":1471004523,"content":"每个人都是个体，每句话每件事没必要牵扯到另一个人，换一种说话跟做法或许不会把自己弄的那么尴尬。","state":"publish","comments_count":6,"allow_comment":true,"share_count":32},{"format":"image","image":"app117255405.jpg","published_at":1471031702,"tag":"","user":{"avatar_updated_at":1470741906,"uid":30922610,"last_visited_at":1452194725,"created_at":1452194725,"state":"active","last_device":"ios_8.4.6","role":"n","login":"忘情浪子","id":30922610,"icon":"2016080911250579.JPEG"},"image_size":{"s":[220,274,16035],"m":[500,623,80244]},"id":117255405,"votes":{"down":-32,"up":426},"created_at":1471018276,"content":"不要去恨一个你爱过的人.....","state":"publish","comments_count":11,"allow_comment":true,"share_count":26},{"format":"image","image":"app117252463.jpg","published_at":1470997201,"tag":"","user":{"avatar_updated_at":1419038818,"uid":21572199,"last_visited_at":1412951563,"created_at":1412951563,"state":"active","last_device":"ios_3.3","role":"n","login":"似海深情","id":21572199,"icon":"20141220092657.jpg"},"image_size":{"s":[209,352,13938],"m":[366,615,35770]},"id":117252463,"votes":{"down":-54,"up":1130},"created_at":1470993395,"content":"你经历过绝望嘛？","state":"publish","comments_count":13,"allow_comment":true,"share_count":28,"type":"hot"},{"format":"image","image":"app117255460.jpg","published_at":1471031703,"tag":"","user":{"avatar_updated_at":1470741906,"uid":30922610,"last_visited_at":1452194725,"created_at":1452194725,"state":"active","last_device":"ios_8.4.6","role":"n","login":"忘情浪子","id":30922610,"icon":"2016080911250579.JPEG"},"image_size":{"s":[220,220,7798],"m":[500,500,40552]},"id":117255460,"votes":{"down":-29,"up":496},"created_at":1471018795,"content":"千变万化的是人心......","state":"publish","comments_count":7,"allow_comment":true,"share_count":24},{"format":"image","image":"app117255225.jpg","published_at":1471018802,"tag":"","user":{"avatar_updated_at":1463348717,"uid":30867665,"last_visited_at":1451392425,"created_at":1451392425,"state":"active","last_device":"android_9.0.0","role":"n","login":"不行，我要去厕所","id":30867665,"icon":"20160515214516.jpg"},"image_size":{"s":[220,307,16070],"m":[479,669,61354]},"id":117255225,"votes":{"down":-35,"up":623},"created_at":1471016399,"content":"是否有同感","state":"publish","comments_count":20,"allow_comment":true,"share_count":25},{"format":"image","image":"app117259849.jpg","published_at":1471078802,"tag":"","user":{"avatar_updated_at":1466733549,"uid":14822089,"last_visited_at":1395205854,"created_at":1395205854,"state":"bonded","last_device":"ios_2.7.1","role":"n","login":"阳春佐罗","id":14822089,"icon":"20160624015908.jpg"},"image_size":{"s":[220,293,9968],"m":[385,512,32039]},"id":117259849,"votes":{"down":-10,"up":37},"created_at":1471075078,"content":"昔日辉煌的岗美糖厂，如今已经破破落落，杂草丛生。岗美糖厂当年辉煌，一条条运蔗的货船在漠阳江边停靠，货车络绎不绝。岗美糖厂在阳春拥有最早的校车，员工宿舍区有花园、文化室等，员工们去春城有专车接送。解决了岗美成百上千人就业问题，对于岗美的经济发展带来了不可磨灭的帮助。怀念岗美糖厂。","state":"publish","comments_count":0,"allow_comment":true,"share_count":0,"type":"fresh"},{"format":"image","image":"app117252502.jpg","published_at":1470995701,"tag":"","user":{"avatar_updated_at":1395839994,"uid":2840953,"last_visited_at":1343868026,"created_at":1343868026,"state":"bonded","last_device":"web","role":"n","login":"天王盖老徐","id":2840953,"icon":"20140326211955.jpg"},"image_size":{"s":[220,220,5857],"m":[400,400,15815]},"id":117252502,"votes":{"down":-72,"up":642},"created_at":1470993786,"content":"刚看到，不知道是不是老梗！","state":"publish","comments_count":18,"allow_comment":true,"share_count":24},{"format":"image","image":"app117256252.jpg","published_at":1471043702,"tag":"","user":{"avatar_updated_at":1412579877,"uid":15961123,"last_visited_at":1398905007,"created_at":1398905007,"state":"bonded","last_device":"android_2.8.3","role":"n","login":"允吸肩上的小脚丫","id":15961123,"icon":"20141006151756.jpg"},"image_size":{"s":[220,288,14878],"m":[500,656,81228]},"id":117256252,"votes":{"down":-40,"up":503},"created_at":1471040489,"content":"苍天啊，你看你把众生都热成什么样啦！\n苍天委屈的说:你丫看清楚了，这要不就是她们前卫超前卫，要不就是尼姑还俗了！关我什么事儿。","state":"publish","comments_count":42,"allow_comment":true,"share_count":21},{"format":"image","image":"app117257935.jpg","published_at":1471060501,"tag":"","user":{"avatar_updated_at":1444075479,"uid":12997829,"last_visited_at":1387537441,"created_at":1387537441,"state":"active","last_device":"android_2.6.3","role":"n","login":"奔跑吧小米","id":12997829,"icon":"20151005200439.jpg"},"image_size":{"s":[220,277,9104],"m":[500,630,45778]},"id":117257935,"votes":{"down":-37,"up":371},"created_at":1471058207,"content":"现在的女的都怎么了","state":"publish","comments_count":19,"allow_comment":true,"share_count":19}]
     * total : 1000
     * page : 1
     * refresh : 1000
     */

    private int count;
    private int err;
    private int total;
    private int page;
    private int refresh;
    /**
     * format : image
     * image : app117253577.jpg
     * published_at : 1471008901
     * tag :
     * user : {"avatar_updated_at":1465956306,"uid":26728090,"last_visited_at":1426670601,"created_at":1426670601,"state":"active","last_device":"android_6.3.0","role":"n","login":"莫抖","id":26728090,"icon":"20160615020505.jpg"}
     * image_size : {"s":[220,293,15102],"m":[500,667,76736]}
     * id : 117253577
     * hot_comment : {"status":"publish","user_id":31508377,"floor":30,"ip":"1.31.114.208","created_at":"2016-08-12 23:23:52","comment_id":363225491,"like_count":223,"pos":0,"content":"第一次听说把找鸭说的这么清新脱俗的！","source":"android","score":null,"parent_id":0,"anonymous":0,"neg":0,"article_id":117253577,"user":{"avatar_updated_at":1461086010,"uid":31508377,"last_visited_at":1459347922,"created_at":1459347922,"state":"active","last_device":"android_9.3.1","role":"n","login":"姑娘你会唱小星星","id":31508377,"icon":"20160419171329.jpg"}}
     * votes : {"down":-258,"up":3303}
     * created_at : 1471003494
     * content : 我要改行了，有人和我一起么？
     * state : publish
     * comments_count : 193
     * allow_comment : true
     * share_count : 256
     * type : hot
     */

    private List<Itemsbean> items;

    public static ChunTu objectFromData(String str) {

        return new Gson().fromJson(str, ChunTu.class);
    }

    public static ChunTu objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), ChunTu.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public static List<ChunTu> arrayChunTuFromData(String str) {

        Type listType = new TypeToken<ArrayList<ChunTu>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public static List<ChunTu> arrayChunTuFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);
            Type listType = new TypeToken<ArrayList<ChunTu>>() {
            }.getType();

            return new Gson().fromJson(jsonObject.getString(str), listType);

        } catch (JSONException e) {
            e.printStackTrace();
        }

        return new ArrayList();


    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getErr() {
        return err;
    }

    public void setErr(int err) {
        this.err = err;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getRefresh() {
        return refresh;
    }

    public void setRefresh(int refresh) {
        this.refresh = refresh;
    }

    public List<Itemsbean> getItems() {
        return items;
    }

    public void setItems(List<Itemsbean> items) {
        this.items = items;
    }

    public static class Itemsbean {
        private String format;
        private String image;
        private int published_at;
        private String tag;
        /**
         * avatar_updated_at : 1465956306
         * uid : 26728090
         * last_visited_at : 1426670601
         * created_at : 1426670601
         * state : active
         * last_device : android_6.3.0
         * role : n
         * login : 莫抖
         * id : 26728090
         * icon : 20160615020505.jpg
         */

        private Userbean user;
        private ImageSizebean image_size;
        private int id;
        /**
         * status : publish
         * user_id : 31508377
         * floor : 30
         * ip : 1.31.114.208
         * created_at : 2016-08-12 23:23:52
         * comment_id : 363225491
         * like_count : 223
         * pos : 0
         * content : 第一次听说把找鸭说的这么清新脱俗的！
         * source : android
         * score : null
         * parent_id : 0
         * anonymous : 0
         * neg : 0
         * article_id : 117253577
         * user : {"avatar_updated_at":1461086010,"uid":31508377,"last_visited_at":1459347922,"created_at":1459347922,"state":"active","last_device":"android_9.3.1","role":"n","login":"姑娘你会唱小星星","id":31508377,"icon":"20160419171329.jpg"}
         */

        private HotCommentbean hot_comment;
        /**
         * down : -258
         * up : 3303
         */

        private Votesbean votes;
        private int created_at;
        private String content;
        private String state;
        private int comments_count;
        private boolean allow_comment;
        private int share_count;
        private String type;

        public static Itemsbean objectFromData(String str) {

            return new Gson().fromJson(str, Itemsbean.class);
        }

        public static Itemsbean objectFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);

                return new Gson().fromJson(jsonObject.getString(str), Itemsbean.class);
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }

        public static List<Itemsbean> arrayItemsbeanFromData(String str) {

            Type listType = new TypeToken<ArrayList<Itemsbean>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public static List<Itemsbean> arrayItemsbeanFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);
                Type listType = new TypeToken<ArrayList<Itemsbean>>() {
                }.getType();

                return new Gson().fromJson(jsonObject.getString(str), listType);

            } catch (JSONException e) {
                e.printStackTrace();
            }

            return new ArrayList();


        }

        public String getFormat() {
            return format;
        }

        public void setFormat(String format) {
            this.format = format;
        }

        public String getImage() {
            return image;
        }

        public void setImage(String image) {
            this.image = image;
        }

        public int getPublished_at() {
            return published_at;
        }

        public void setPublished_at(int published_at) {
            this.published_at = published_at;
        }

        public String getTag() {
            return tag;
        }

        public void setTag(String tag) {
            this.tag = tag;
        }

        public Userbean getUser() {
            return user;
        }

        public void setUser(Userbean user) {
            this.user = user;
        }

        public ImageSizebean getImage_size() {
            return image_size;
        }

        public void setImage_size(ImageSizebean image_size) {
            this.image_size = image_size;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public HotCommentbean getHot_comment() {
            return hot_comment;
        }

        public void setHot_comment(HotCommentbean hot_comment) {
            this.hot_comment = hot_comment;
        }

        public Votesbean getVotes() {
            return votes;
        }

        public void setVotes(Votesbean votes) {
            this.votes = votes;
        }

        public int getCreated_at() {
            return created_at;
        }

        public void setCreated_at(int created_at) {
            this.created_at = created_at;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        public int getComments_count() {
            return comments_count;
        }

        public void setComments_count(int comments_count) {
            this.comments_count = comments_count;
        }

        public boolean isAllow_comment() {
            return allow_comment;
        }

        public void setAllow_comment(boolean allow_comment) {
            this.allow_comment = allow_comment;
        }

        public int getShare_count() {
            return share_count;
        }

        public void setShare_count(int share_count) {
            this.share_count = share_count;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public static class Userbean {
            private int avatar_updated_at;
            private int uid;
            private int last_visited_at;
            private int created_at;
            private String state;
            private String last_device;
            private String role;
            private String login;
            private int id;
            private String icon;

            public static Userbean objectFromData(String str) {

                return new Gson().fromJson(str, Userbean.class);
            }

            public static Userbean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), Userbean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public static List<Userbean> arrayUserbeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<Userbean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public static List<Userbean> arrayUserbeanFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);
                    Type listType = new TypeToken<ArrayList<Userbean>>() {
                    }.getType();

                    return new Gson().fromJson(jsonObject.getString(str), listType);

                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return new ArrayList();


            }

            public int getAvatar_updated_at() {
                return avatar_updated_at;
            }

            public void setAvatar_updated_at(int avatar_updated_at) {
                this.avatar_updated_at = avatar_updated_at;
            }

            public int getUid() {
                return uid;
            }

            public void setUid(int uid) {
                this.uid = uid;
            }

            public int getLast_visited_at() {
                return last_visited_at;
            }

            public void setLast_visited_at(int last_visited_at) {
                this.last_visited_at = last_visited_at;
            }

            public int getCreated_at() {
                return created_at;
            }

            public void setCreated_at(int created_at) {
                this.created_at = created_at;
            }

            public String getState() {
                return state;
            }

            public void setState(String state) {
                this.state = state;
            }

            public String getLast_device() {
                return last_device;
            }

            public void setLast_device(String last_device) {
                this.last_device = last_device;
            }

            public String getRole() {
                return role;
            }

            public void setRole(String role) {
                this.role = role;
            }

            public String getLogin() {
                return login;
            }

            public void setLogin(String login) {
                this.login = login;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getIcon() {
                return icon;
            }

            public void setIcon(String icon) {
                this.icon = icon;
            }
        }

        public static class ImageSizebean {
            private List<Integer> s;
            private List<Integer> m;

            public static ImageSizebean objectFromData(String str) {

                return new Gson().fromJson(str, ImageSizebean.class);
            }

            public static ImageSizebean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), ImageSizebean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public static List<ImageSizebean> arrayImageSizebeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<ImageSizebean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public static List<ImageSizebean> arrayImageSizebeanFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);
                    Type listType = new TypeToken<ArrayList<ImageSizebean>>() {
                    }.getType();

                    return new Gson().fromJson(jsonObject.getString(str), listType);

                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return new ArrayList();


            }

            public List<Integer> getS() {
                return s;
            }

            public void setS(List<Integer> s) {
                this.s = s;
            }

            public List<Integer> getM() {
                return m;
            }

            public void setM(List<Integer> m) {
                this.m = m;
            }
        }

        public static class HotCommentbean {
            private String status;
            private int user_id;
            private int floor;
            private String ip;
            private String created_at;
            private int comment_id;
            private int like_count;
            private int pos;
            private String content;
            private String source;
            private Object score;
            private int parent_id;
            private int anonymous;
            private int neg;
            private int article_id;
            /**
             * avatar_updated_at : 1461086010
             * uid : 31508377
             * last_visited_at : 1459347922
             * created_at : 1459347922
             * state : active
             * last_device : android_9.3.1
             * role : n
             * login : 姑娘你会唱小星星
             * id : 31508377
             * icon : 20160419171329.jpg
             */

            private Userbean user;

            public static HotCommentbean objectFromData(String str) {

                return new Gson().fromJson(str, HotCommentbean.class);
            }

            public static HotCommentbean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), HotCommentbean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public static List<HotCommentbean> arrayHotCommentbeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<HotCommentbean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public static List<HotCommentbean> arrayHotCommentbeanFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);
                    Type listType = new TypeToken<ArrayList<HotCommentbean>>() {
                    }.getType();

                    return new Gson().fromJson(jsonObject.getString(str), listType);

                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return new ArrayList();


            }

            public String getStatus() {
                return status;
            }

            public void setStatus(String status) {
                this.status = status;
            }

            public int getUser_id() {
                return user_id;
            }

            public void setUser_id(int user_id) {
                this.user_id = user_id;
            }

            public int getFloor() {
                return floor;
            }

            public void setFloor(int floor) {
                this.floor = floor;
            }

            public String getIp() {
                return ip;
            }

            public void setIp(String ip) {
                this.ip = ip;
            }

            public String getCreated_at() {
                return created_at;
            }

            public void setCreated_at(String created_at) {
                this.created_at = created_at;
            }

            public int getComment_id() {
                return comment_id;
            }

            public void setComment_id(int comment_id) {
                this.comment_id = comment_id;
            }

            public int getLike_count() {
                return like_count;
            }

            public void setLike_count(int like_count) {
                this.like_count = like_count;
            }

            public int getPos() {
                return pos;
            }

            public void setPos(int pos) {
                this.pos = pos;
            }

            public String getContent() {
                return content;
            }

            public void setContent(String content) {
                this.content = content;
            }

            public String getSource() {
                return source;
            }

            public void setSource(String source) {
                this.source = source;
            }

            public Object getScore() {
                return score;
            }

            public void setScore(Object score) {
                this.score = score;
            }

            public int getParent_id() {
                return parent_id;
            }

            public void setParent_id(int parent_id) {
                this.parent_id = parent_id;
            }

            public int getAnonymous() {
                return anonymous;
            }

            public void setAnonymous(int anonymous) {
                this.anonymous = anonymous;
            }

            public int getNeg() {
                return neg;
            }

            public void setNeg(int neg) {
                this.neg = neg;
            }

            public int getArticle_id() {
                return article_id;
            }

            public void setArticle_id(int article_id) {
                this.article_id = article_id;
            }

            public Userbean getUser() {
                return user;
            }

            public void setUser(Userbean user) {
                this.user = user;
            }

            public static class Userbean {
                private int avatar_updated_at;
                private int uid;
                private int last_visited_at;
                private int created_at;
                private String state;
                private String last_device;
                private String role;
                private String login;
                private int id;
                private String icon;

                public static Userbean objectFromData(String str) {

                    return new Gson().fromJson(str, Userbean.class);
                }

                public static Userbean objectFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);

                        return new Gson().fromJson(jsonObject.getString(str), Userbean.class);
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return null;
                }

                public static List<Userbean> arrayUserbeanFromData(String str) {

                    Type listType = new TypeToken<ArrayList<Userbean>>() {
                    }.getType();

                    return new Gson().fromJson(str, listType);
                }

                public static List<Userbean> arrayUserbeanFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);
                        Type listType = new TypeToken<ArrayList<Userbean>>() {
                        }.getType();

                        return new Gson().fromJson(jsonObject.getString(str), listType);

                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return new ArrayList();


                }

                public int getAvatar_updated_at() {
                    return avatar_updated_at;
                }

                public void setAvatar_updated_at(int avatar_updated_at) {
                    this.avatar_updated_at = avatar_updated_at;
                }

                public int getUid() {
                    return uid;
                }

                public void setUid(int uid) {
                    this.uid = uid;
                }

                public int getLast_visited_at() {
                    return last_visited_at;
                }

                public void setLast_visited_at(int last_visited_at) {
                    this.last_visited_at = last_visited_at;
                }

                public int getCreated_at() {
                    return created_at;
                }

                public void setCreated_at(int created_at) {
                    this.created_at = created_at;
                }

                public String getState() {
                    return state;
                }

                public void setState(String state) {
                    this.state = state;
                }

                public String getLast_device() {
                    return last_device;
                }

                public void setLast_device(String last_device) {
                    this.last_device = last_device;
                }

                public String getRole() {
                    return role;
                }

                public void setRole(String role) {
                    this.role = role;
                }

                public String getLogin() {
                    return login;
                }

                public void setLogin(String login) {
                    this.login = login;
                }

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }

                public String getIcon() {
                    return icon;
                }

                public void setIcon(String icon) {
                    this.icon = icon;
                }
            }
        }

        public static class Votesbean {
            private int down;
            private int up;

            public static Votesbean objectFromData(String str) {

                return new Gson().fromJson(str, Votesbean.class);
            }

            public static Votesbean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), Votesbean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public static List<Votesbean> arrayVotesbeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<Votesbean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public static List<Votesbean> arrayVotesbeanFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);
                    Type listType = new TypeToken<ArrayList<Votesbean>>() {
                    }.getType();

                    return new Gson().fromJson(jsonObject.getString(str), listType);

                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return new ArrayList();


            }

            public int getDown() {
                return down;
            }

            public void setDown(int down) {
                this.down = down;
            }

            public int getUp() {
                return up;
            }

            public void setUp(int up) {
                this.up = up;
            }
        }
    }
}
